#include "EspInstanceApplication.h"
#include "EspInstanceWindow.h"

#include "BlockScriptComponent.h"
#include "IElementBlockly.h"
#include "IElementBlockScriptIDE.h"

EspInstanceApplication *EspInstanceApplication::GetInstance()
{
    static EspInstanceApplication s_instance;
    return &s_instance;
}

void EspInstanceApplication::Main()
{
    // auto component = BlockScriptComponent::LoadFromFile(GetAssetDirectory() + "/components/测试.cbs.xml");
    // auto component = BlockScriptComponent::LoadFromFile(GetAssetDirectory() + "/components/test.cbs.xml");
    // auto component = BlockScriptComponent::LoadFromFile(GetAssetDirectory() + "/components/abc.cbs.xml");
    // component->Show();

    // auto text = std::make_shared<IElementTextLine>();
    // text->SetText("中文");
    // text->Show();

    // std::make_shared<IElementBlockly>()->Show();
    
    // std::make_shared<IElementBlockScriptIDE>()->Show();

    MainApplication::Main();

    EspInstanceWindow::DumpMemory();
}